module.exports = {
  mysql: {
    host: 'localhost',
    user: 'root',
    password: 'admin123',
    database: 'shop'
  },
  jwt: 'Pc!0YQPA$57iksjA',
  rsa: {
    private_key: '../config/private_key.pem',
    public_key: '../config/public_key.pem'
  },
  filter: {
    login: '/user/login',
    add: '/user/add'
  },
  sql: {
    getUserAddress: 'SELECT user_address from `user` where user_id = ?',
    updateUserMoney: 'UPDATE `user` SET user_money = ? WHERE user_id = ?',
    userOrderTotalMoney: 'SELECT goods_totalprice from goods where goods_id = ?',
    getUserMoney: 'SELECT user_money from `user` where user_id = ?',
    buyOrder: 'UPDATE goods SET goods_status = ? WHERE goods_id = ?',
    getStatusOrder: 'SELECT goods.*, wares.* FROM goods, wares WHERE goods.wares_id = wares.wares_id AND goods.user_id = ? AND goods.goods_status = ?',
    getAllOrder: 'SELECT goods.*, wares.* FROM goods, wares WHERE goods.wares_id = wares.wares_id AND goods.user_id = ?',
    addCarToOrder: 'INSERT INTO goods (user_id,wares_id,goods_num,goods_price,goods_totalprice) VALUES (?,?,?,?,?)',
    updateCarNum: 'UPDATE car SET car_num = ? WHERE car_id = ?',
    deleteCarShop: 'DELETE FROM car WHERE car_id = ?',
    getCarList: 'SELECT car.user_id,car.car_id,car.car_num, wares.* FROM car ,wares WHERE car.wares_id = wares.wares_id AND car.user_id = ?',
    selectCarShop: 'SELECT * from car where user_id = ? and wares_id = ?',
    addCar: 'INSERT INTO car (user_id,wares_id,car_num) VALUES (?,?,?)',
    getLikeList: 'SELECT collection.like_id, wares.* FROM collection ,wares WHERE collection.wares_id = wares.wares_id AND collection.user_id = ?',
    selectLike: 'SELECT * from collection where wares_id = ? and user_id = ?',
    likeShop: 'INSERT INTO collection (wares_id,user_id) VALUES (?, ?)',
    getSearchShop: `SELECT * from wares where wares_title LIKE "%?%"`,
    getTypeList: 'SELECT wares_title,wares_id,wares_masterimg from wares where wares_type = ?',
    getActivity: 'SELECT * from wares where wares_activity = ?',
    getInfo: 'SELECT * from wares where wares_id = ?',
    getIndex: 'SELECT * from wares ORDER BY wares_id DESC LIMIT 20',
    addUser: 'INSERT INTO `user` (user_name,user_pwd,user_phone,user_time) VALUES (?, ?, ?, ?)',
    userLogin: 'SELECT * from user where user_name = ? and user_pwd = ?'
  }
};
